

<div class="bDiv" style="height: auto;">
    <form action="{:U('Agent/batchDo')}" method="post" id="batch_do">
        <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
            <table>
                <input type="hidden" name="type" value="" id="do_type"/>
                <tbody>
                <volist name="agents" id="agent" key="k">
                    <tr>
                        <td align="center" axis="col0">
                            <div style="width: 30px;">
                                <input type="checkbox" class="check_list" name="agent_id[]" value="{$agent['agent_id']}"/>
                            </div>
                        </td>
                        <td align="center" axis="col0"><div style="width: 50px;">{$agent.agent_id}</div></td>
                        <td class="handle">
                            <div style="text-align:left;min-width:50px !important; max-width:inherit !important;">
                              <span class="btn">
                                  <em><a href="{:U('Agent/agent_view',array('id'=>$agent['agent_id']))}"><i class="fa fa-search"></i>查看</a></em>
                              </span>
                            </div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: left; width: 130px;">{$agent.agent_name}</div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 60px;">
                                <if condition='$agent[is_agent] eq 1'>代理<else/>会员
                                </if>
                            </div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 100px;">{$agent.mobile}</div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 80px;">{$agent.all_achi}</div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 80px;">{$agent.money}</div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 100px;">{:GetAgentNameById($agent['parent_id'])}</div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 80px;">
                                <if condition="$agent[invitation_code] eq '*'">
                                    <strong class="yes">是</strong>
                                    <else /><strong class="no">否</strong>
                                </if>
                            </div>
                        </td>
                        <td align="center" axis="col0">
                            <div style="text-align: center; width: 60px;">
                                <if condition='$agent[u_status] eq 1'>
                                    <strong class="yes">正常</strong>
                                    <elseif condition="$agent[u_status] eq '0'"/>
                                    <strong class="red_common">关闭</strong>
                                    <else/><strong class="no">待审核</strong>
                                </if>
                            </div>
                        </td>
                        <td align="" class="" style="width: 100%;">
                            <div>&nbsp;</div>
                        </td>
                    </tr>
                </volist>
                </tbody>
            </table>
            {$page}
        </div>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        // 刷选条件 鼠标 移动进去 移出 样式
        $(".hDivBox > table > thead > tr > th.mhover").mousemove(function(){
            $(this).addClass('thOver');
        }).mouseout(function(){
            $(this).removeClass('thOver');
        });

        $(".pagination a").click(function(){
            cur_page = $(this).data('p');
            ajax_get_table(cur_page);
        });

        $("#check_all").click(function(){
            $("input[class='check_list']").prop('checked', $(this).prop("checked"));
        });

        $(function(){
            $('.changeS').click(function ()
            {
                var do_type = $(this).attr("do");
                layer.confirm('您确认进行此操作吗？', {
                    btn: ['确认','取消']
                }, function(){
                    $("#do_type").attr("value", do_type);
                    $("#batch_do").submit();
                });
            });
        });
    });
</script>